package r4.pierwszy.raz;

import java.util.Date;
import java.util.GregorianCalendar;

public final class Employee {

	private String name;
	private double salary;
	private Date hireDay;
	
	public Employee(final String name, final double salary, final int year, final int month, final int day){
		this.name = name;
		this.salary = salary;
		this.hireDay = new GregorianCalendar(year, month - 1, day).getTime();
	}

	public String getName() {
		return name;
	}

	public double getSalary() {
		return salary;
	}

	public Date getHireDay() {
		return (Date) hireDay.clone();
	}
	
	public void raiseSlary(double byPercent){
		this.salary += this.salary * byPercent / 100;
	}
}
